package com.max.back.demo.form;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

@Data
public class CodenameForm {
    public interface Base {
    }

    public interface Find {
    }
    public interface Getlist {
    }
    public interface Delete {
    }
    public interface Update extends Base {

    }
    @NotBlank(groups ={Base.class,Update.class,Delete.class},message = "常数项编号不能为空")
    @Length(max = 36,groups = {Base.class, Update.class,Delete.class},message = "常数项编号长度要小于36")
    private String id;
    @NotBlank(groups ={Base.class,Update.class,Getlist.class},message = "常数项类别不能为空")
    @Length(max = 3,min = 3,groups = {Base.class, Update.class,Getlist.class},message = "常数项类别长度要等于3")
    private String codeid;
    @NotBlank(groups ={Base.class,Update.class},message = "常数项名字不能为空")
    @Length(max = 36,groups = {Base.class, Update.class},message = "常数项名字不能为空")
    private String name;
}
